package com.suarte.core.service.impl;

import com.suarte.core.Product;
import com.suarte.core.Resolution;
import com.suarte.core.WorkType;
import com.suarte.core.dao.ProductDao;
import com.suarte.core.service.ProductManager;
import org.appfuse.service.impl.GenericManagerImpl;

import java.util.List;

/**
 * @date   Jan 10th, 2011
 * @author Ggutierrez
 */
public class ProductManagerImpl extends GenericManagerImpl<Product, Long> implements ProductManager {
    ProductDao productDao;

    public ProductManagerImpl(ProductDao productDao) {
        super(productDao);
        this.productDao = productDao;
    }

    public List<Product> findByDescription(String description) {
        return productDao.findByDescription(description);
    }

    public List<Product> findByCode(String code) {
        return productDao.findByCode(code);
    }

    public List<Product> findProducts(String code, String description, Resolution resolution, WorkType workType) {
        return productDao.findProducts(code, description, resolution, workType);
    }
}
